home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / Malloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-16  |  1.2 KB  |  66 lines

  1. /* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.2 $ */
  2. #if __SC__ || __RCC__
  3. #pragma once
  4. #endif
  5.  
  6. #ifndef __MALLOC_H
  7. #define __MALLOC_H 1
  8.  
  9. #include <stdlib.h>
  10.  
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14.  
  15. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  16. #ifndef _CRTAPI1
  17. #define _CRTAPI1 __cdecl
  18. #endif
  19.  
  20. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  21. #ifndef _CRTAPI2
  22. #define _CRTAPI2 __cdecl
  23. #endif
  24.  
  25. /* Define CRTIMP */
  26. #ifndef _CRTIMP
  27. #if defined(_WIN32) && defined(_DLL)
  28. #define _CRTIMP  __declspec(dllimport)
  29. #else
  30. #define _CRTIMP
  31. #endif
  32. #endif
  33.  
  34. #include <heapstat.h>
  35.  
  36. int __cdecl _heapchk(void);
  37. int __cdecl _heapset(unsigned);
  38. #if __INTSIZE == 2
  39. int __cdecl _heapadd(void __far *,size_t);
  40. int __cdecl _fheapmin(void);
  41. #else
  42. int __cdecl _heapadd(void *,size_t);
  43. #endif
  44. int __cdecl _heapmin(void);
  45.  
  46. _CRTIMP void * __CLIB realloc(void *,size_t);
  47. _CRTIMP void * __CLIB calloc(size_t, size_t);
  48. _CRTIMP void   __CLIB free(void *);
  49. _CRTIMP void * __CLIB malloc(size_t);
  50. _CRTIMP size_t __CLIB _msize(void *);
  51.  
  52. #ifdef __NT__
  53. #define _expand realloc
  54. #else
  55. void * __cdecl _expand(void *,size_t);
  56. #endif
  57.  
  58.  
  59.  
  60.  
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64.  
  65. #endif
  66.